import numpy as np

array = np.random.randint(low=1, high=1000, size=10)

print(array)


def quick_sort(a: list) -> object:
    return sort(0, len(a) - 1, a)


def sort(low: int, high: int, a: list) -> object:
    if low < high:
        key = quick(low, high, a)
        sort(low, key - 1, a)
        sort(key + 1, high, a)


def quick(low: int, high: int, a: list) -> object:
    while low < high:
        pivot_key = a[low]
        while low < high and a[high] >= pivot_key:
            high -= 1
        a[low], a[high] = a[high], a[low]
        while low < high and a[low] <= pivot_key:
            low += 1
        a[low], a[high] = a[high], a[low]
    return low

quick_sort(array)

print(array)
